package com.banshou.installs.model.net;

import com.banshou.installs.model.dao.RequestActive;
import com.banshou.installs.model.dao.RequestAddStaff;
import com.banshou.installs.model.dao.RequestDelStaff;
import com.banshou.installs.model.dao.RequestFirstLoginUpdatePass;
import com.banshou.installs.model.dao.RequestForgetPass;
import com.banshou.installs.model.dao.RequestLogin;
import com.banshou.installs.model.dao.ResponseActive;
import com.banshou.installs.model.dao.ResponseCheckCode;
import com.banshou.installs.model.dao.ResponseDY;
import com.banshou.installs.model.dao.ResponseHome;
import com.banshou.installs.model.dao.ResponseInstallHis;
import com.banshou.installs.model.dao.ResponseLogin;
import com.banshou.installs.model.dao.ResponseStaff;
import com.banshou.installs.model.dao.ResponseUpdate;
import com.banshou.installs.model.dao.ResponseXQ;
import com.banshou.installs.model.dao.ResponseZ;
import com.banshou.installs.model.dao.RequestSendLoucenInfo;
import com.banshou.installs.model.dao.ResponseEleInfo;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by cjq on 2018/1/2.
 * Email: stoic_yb@139.com
 * features:
 */

public interface ResponseInfo {
    //员工列表
    @GET("rest/install/loadEmpList")
    Observable<ResponseStaff> loadEmployee();

    //登陆
    @POST("rest/install/login")
    Observable<ResponseLogin> login(@Body RequestLogin requestLogin);

    //增加员工
    @POST("rest/install/addEmp")
    Observable<ResponseLogin> addStaff(@Body RequestAddStaff requestAddStass);

    //删除员工
    @POST("rest/install/delEmp")
    Observable<ResponseLogin> delStaff(@Body RequestDelStaff requestDelStaff);

    //修改密码
    @POST("rest/install/forgetPwd")
    Observable<ResponseLogin> forgetPwd(@Body RequestForgetPass forgetPass);

    //员工第一次登录修改密码
    @POST("rest/install/updatePwdFirst")
    Observable<ResponseLogin> updateFirstPwd(@Body RequestFirstLoginUpdatePass firstLoginUpdatePass);

    //个人信息
    @POST("rest/install/personalCenter")
    Call<ResponseLogin> personCenter(@QueryMap Map<String, String> options);

    //安装历史
    @GET("rest/install/loadElevatorList")
    Observable<ResponseInstallHis> installHis();

    //退出
//    @GET("rest/install/logout")
//    Call<ResponseLogin> logout(@QueryMap Map<String, String> options);

    //    获取项目分页
//    @GET("rest/install/getSubscribes")
//    Call<ResponseHome> getInfo(@QueryMap Map<String, String> options);

    //获取小区
    @GET("rest/install/locaBuildingList")
    Observable<ResponseXQ> getXQ();

    //获取幢
    @GET("rest/install/loadZhuangList")
    Observable<ResponseZ> getZ(@Query("community_id") String id);

    //获取单元
    @GET("rest/install/loadDanyuanList")
    Observable<ResponseDY> getDY(@Query("building_id") String id);

    //激活
    @POST("rest/install/activetionElevator")
    Observable<ResponseActive> actEle(@Body RequestActive active);

    //    获取验证码
    @POST("smsJson.aspx")
    Call<ResponseCheckCode> getCheckCode(@Query("userid") String userid,
                                         @Query("account") String account,
                                         @Query("password") String password,
                                         @Query("mobile") String mobile,
                                         @Query("content") String content,
                                         @Query("sendTime") String sendTime,
                                         @Query("action") String action,
                                         @Query("extno") String extno);

    //设置楼层名称和性质
    @POST("rest/install/setElevatorLoucenInfo")
    Observable<ResponseLogin> setEleInfo(@Body RequestSendLoucenInfo loucenInfo);

    //查看按键详情
    @GET("rest/install/loadElevatorLoucenInfo")
    Observable<ResponseEleInfo> loadInfo(@QueryMap Map<String, String> options);

    //更新
    @GET("rest/install/getAppVersionInstall")
    Observable<ResponseUpdate> getAppVersion(@Query("old_version") int version, @Query("type") int type);

}
